package com.zhentao.utils;

import lombok.Data;

@Data
public class Result {
    private Integer code;
    private String message;
    private Object data;
    public static Result OK(String message,Object data){
        Result result=new Result();
        result.setData(data);
        result.setCode(200);
        result.setMessage(message);
        return result;
    }
    public static Result ERROR(String message,Object data){
        Result result=new Result();
        result.setData(data);
        result.setCode(400);
        result.setMessage(message);
        return result;
    }
    public static Result OK1(String message,Integer code){
        Result result=new Result();
        result.setCode(200);
        result.setMessage(message);
        return result;
    }
    public static Result ERROR1(String message,Integer code){
        Result result=new Result();
        result.setCode(400);
        result.setMessage(message);
        return result;
    }
}
